<?php
$username = $_POST['username'];
$password = $_POST['password'];
$realname = $_POST['realname'];
$studentID = $_POST['studentID'];
$gender = $_POST['gender'];
$class = $_POST['class'];
$hobbies = $_POST['hobbies'];
$introduction = $_POST['introduction'];

echo "用户名: " . $username . "<br>";
echo "密码: " . $password . "<br>";
echo "姓名: " . $realname . "<br>";
echo "学号: " . $studentID . "<br>";
if($gender == 1){
    echo "性别: 男<br>";
}elseif($gender == 1){
    echo "性别: 女<br>";
}elseif($gender == 1){
    echo "性别: 未知<br>";
}

echo "班级: 网络 21-" . $class . " 班<br>";
echo "兴趣爱好: ";
foreach ($hobbies as $item) {
    switch ($item) {
        case 1:
            echo "篮球 ";
            break;
        case 2:
            echo "足球 ";
            break;
        case 3:
            echo "排球 ";
            break;
        case 4:
            echo "羽毛球 ";
            break;
    }
}
echo "<br>";
echo "自我介绍: " . $introduction;
